<template>
	<view class="hot-option">
		<view class="title-block center">
			<image :src="itemData.img_url" style="width: 100%; height: 244rpx;border-radius: 16rpx;" mode=""></image>
			<!-- 			<view class="txt">严选产品</view>
			<view class="border-block"></view>
			<span class='cool-block'>
				半小时到家
			</span> -->
		</view>
		<view class="content-option">
			<view class="items-block">
				<block v-for="(item,index) in itemData.commodityEntitys" :key="index">
					<view v-if="index<6">
						<item @itemClick='itemClick' :goods='item'></item>
					</view>
				</block>
			</view>
			 
		</view>
		<view class="more-block">
			<view class="more-txt" @click="moreClick">查看更多>></view>
		</view>
	</view>
</template>

<script>
	import item from '@/pages/tabbar/index/components/item.vue'
	export default {
		components: {
			item
		},
		props: {
			itemData: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {
				 
			}
		},
		methods: {
			itemClick(goodsId) {

				this.$emit('distributionClick', goodsId)
			},
			moreClick() {
				this.$emit('moreClick')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.hot-option {
		margin-top: 68rpx;
		 
	}

	.title-block {
		// padding-top: 27rpx;
		display: flex;
		align-items: center;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
		background: rgba(97, 181, 145, 0.3);
		height: 122rpx;

		.txt {
			margin-left: 24rpx;
			font-size: 32rpx;
			font-weight: 500;
			color: rgba(0, 0, 0, 1);
		}

		.border-block {
			margin: 0 12rpx;
			width: 2rpx;
			height: 24rpx;
			background: rgba(26, 27, 28, 1);

		}

		.cool-block {
			border-radius: 352rpx 352rpx 352rpx 2rpx;
			// border-radius: 16rpx 16rpx 0rpx 0rpx;
			font-size: 24rpx;
			color: rgba(255, 255, 255, 1);
			background: rgba(228, 49, 38, 1);
			padding: 8rpx 12rpx;
		}
	}

	.content-option {
		position: relative;
		left: 0;
		right: 0;
		top: -10rpx;
		border-radius: 16rpx;
		padding: 24rpx 0 24rpx 0;
		background: #fff;
	 
		.items-block {
			display: flex;
			flex-wrap: wrap;
			// width: 100%;
			// background: yellow;
		}

		 

	}
	
	.more-block {
		// margin: 0 22rpx;
		border-bottom-left-radius: 32rpx;
		border-bottom-right-radius: 32rpx;
		box-sizing: border-box;
		height: 100rpx;
		background: #F2C0BF;
		font-size: 28rpx;
		font-weight: 400;
	 
		width: 100%;
		// bottom: -68rpx;
		margin-top: -40rpx;
		// color: rgba(156, 84, 8, 1);
		.more-txt {
			 
			display: flex;
			align-items: center;
			height: 100%;
			width: 100%;
			// background-color: red;
			justify-content: center;
			font-weight: bold;
			color: #472520;
			font-size: 28rpx;
			margin-top: 12rpx;
		}
	}
</style>
